package com.ruoyi.knd.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.knd.mapper.KndArticleMapper;
import com.ruoyi.knd.domain.KndArticle;
import com.ruoyi.knd.service.IKndArticleService;
import com.ruoyi.common.core.text.Convert;

/**
 * articleService业务层处理
 * 
 * @author tj
 * @date 2021-10-14
 */
@Service
public class KndArticleServiceImpl implements IKndArticleService 
{
    @Autowired
    private KndArticleMapper kndArticleMapper;

    /**
     * 查询article
     * 
     * @param id article主键
     * @return article
     */
    @Override
    public KndArticle selectKndArticleById(Long id)
    {
        return kndArticleMapper.selectKndArticleById(id);
    }

    /**
     * 查询article列表
     * 
     * @param kndArticle article
     * @return article
     */
    @Override
    public List<KndArticle> selectKndArticleList(KndArticle kndArticle)
    {
        return kndArticleMapper.selectKndArticleList(kndArticle);
    }

    /**
     * 新增article
     * 
     * @param kndArticle article
     * @return 结果
     */
    @Override
    public int insertKndArticle(KndArticle kndArticle)
    {
        return kndArticleMapper.insertKndArticle(kndArticle);
    }

    /**
     * 修改article
     * 
     * @param kndArticle article
     * @return 结果
     */
    @Override
    public int updateKndArticle(KndArticle kndArticle)
    {
        return kndArticleMapper.updateKndArticle(kndArticle);
    }

    /**
     * 批量删除article
     * 
     * @param ids 需要删除的article主键
     * @return 结果
     */
    @Override
    public int deleteKndArticleByIds(String ids)
    {
        return kndArticleMapper.deleteKndArticleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除article信息
     * 
     * @param id article主键
     * @return 结果
     */
    @Override
    public int deleteKndArticleById(Long id)
    {
        return kndArticleMapper.deleteKndArticleById(id);
    }
}
